package com.example.origin.demo.demo;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("StaticOrderDemo")
@RestController
public class StaticOrderDemo {

	@GetMapping("test")
	public void test(){
		StaticOrderDemo.print();
		new StaticOrderDemo().print2();
		System.out.println(!new StaticOrderDemo().tryAcquire(0));
		
	}

	protected boolean tryAcquire(int arg) {
        throw new UnsupportedOperationException();
    }
	
	static {
		System.out.println(1);
	}
	{
		System.out.println(3);
	}

	static void print() {
		System.out.println(2);
	}

	private void print2() {
		System.out.println(4);
	}
}
